<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>节点</title>
	<style type="text/css">
		.box{
			width: 300px;
			height: 400px;
			border: 1px solid red;
			overflow: scroll;
		}

	</style>
	<script type="text/javascript">
		window.onload = function () {
			box = document.getElementById("box");
			text = document.getElementById("text");
			btn = document.getElementById("btn");

			btn.onclick = function  () {
				now = new Date();
				h =now.getHours();
				m =now.getMinutes();
				s =now.getSeconds();
				content = text.value;
				p = document.createElement('p');
				p.innerHTML=h+":"+m+":"+s;
				box.appendChild(p);
				p = document.createElement('p');
				p.innerHTML=content;
				box.appendChild(p);
			}
		}
	</script>
</head>
<body>
	<div class="box" id="box"></div>
	<input type="text" id="text"><input id="btn" type="button" value="发送">
</body>
</html>